<?php

Route::group(['middleware' => 'web', 'prefix' => 'admin', 'namespace' => 'Modules\Admin\Http\Controllers'], function()
{
	Auth::routes();
});
Route::group(['middleware' => ['web','auth:admin'], 'prefix' => 'admin', 'namespace' => 'Modules\Admin\Http\Controllers'], function()
{
    Route::get('/', 'AdminController@index');
    Route::resource ('adminuser','AdminUserController')->middleware("permission:admin,resource");
    Route::get('/adminuser/del/{id}','AdminUserController@del')->name('del')->middleware("permission:admin");;
    Route::get('/showrole/{id}','AdminUserController@showrole')->middleware("permission:admin,");;
    Route::post('/addrole/{id}','AdminUserController@addrole')->middleware("permission:admin");;
    Route::resource('role','RoleController')->middleware("permission:admin,resource");;
	Route::get('/role/del/{id}','RoleController@roledel')->middleware("permission:admin");;
	Route::get('/showpermission/{id}','RoleController@showpermission')->middleware("permission:admin");;
	Route::post('/addpermission/{id}','RoleController@addpermission')->middleware("permission:admin");;
});

